/**
 * 活动卡片api
 */
import instance from "@/utils/request";

//活动卡片列表分页查询
export function GetCardListApi(data = {}) {
    return instance.request({
        method: "post",
        url: "/card/ad/list/page",
        data
    })
}

//活动卡片添加
export function AddCardListApi(data = {}) {
    return instance.request({
        method: "post",
        url: "/card/ad/add",
        data
    })
}

//删除分页数据
export function DelCardListApi(cardAdId) {
    return instance.request({
        method: "DELETE",
        url: `/card/ad/del/${cardAdId}`,
    })
}

//广告禁用/启用
export function changeCardListApi(cardAdId) {
    return instance.request({
        method: "get",
        url: `/card/ad/status/${cardAdId}`,
    })
}

//卡片广告编辑回显
export function EchoCardListApi(cardAdId) {
    return instance.request({
        method: "get",
        url: `/card/ad/get/${cardAdId}`,
    })
}

//卡片广告编辑
export function EditCardListApi(data) {
    return instance.request({
        method: "post",
        url: `/card/ad/edit`,
        data
    })
}